using System;
using System.Collections;

using Microsoft.DirectX.Direct3D;




namespace iDorm
{
	// Room
	//
	// Represents the dorm room
	public class Room
	{
		// Priavte data members
		float width, length;

		// Objects within room
		ArrayList objects;





		// Default constructor
		//
		// Description:	initializes the room class with the default settings
		// Input:		None
		// Output:		None
		public Room(float width, float length)
		{
			this.width = width;
			this.length = length;

			objects = new ArrayList();
		}

		// Add Object
		//
		// Description:	adds object to room
		// Input:		Object
		// Output:		None
		public void AddObject(Object obj)
		{
			objects.Add(obj);
		}

		// Remove Object
		//
		// Description:	removes object from room
		// Input:		Object
		// Output:		None
		public void RemoveObject(Object obj)
		{
			objects.Remove(obj);
		}

		public ArrayList GetObjects()
		{
			return objects;
		}

		public void RenderRoom2D(Device dev)
		{
			foreach (Object o in objects)
			{
				o.Render2D(dev);
			}
		}

		public void RenderRoom3D()
		{
			foreach (Object o in objects)
			{
				o.Render3D();
			}
		}
	}
}
